<html>
<head><meta charset="utf-8"><title>Deprecate target_vendor  lang-team#102 · t-lang/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/index.html">t-lang/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html">Deprecate target_vendor  lang-team#102</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244751977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244751977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244751977">(Jul 02 2021 at 20:09)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/lang-team/issues/102">Deprecate target_vendor  #102</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="244752522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752522">(Jul 02 2021 at 20:14)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="1977">@T-lang</span>: Proposal <a href="https://github.com/rust-lang/lang-team/issues/102#issuecomment-873235819">#102</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="244752611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752611">(Jul 02 2021 at 20:16)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> (psst, discussion goes in Zulip. ;) )</p>



<a name="244752653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752653">(Jul 02 2021 at 20:16)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> Thank you!</p>



<a name="244752665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752665">(Jul 02 2021 at 20:16)</a>:</h4>
<p>The <code>gba</code> project <em>had</em> been using target_vendor to distinguish the GBA from other similar CPUs. However, when a target for it was added to the compiler it was added as <code>thumbv4t-none-eabi</code>, and it's actually too hard to use any non-standard target info so we just gave up on doing that at all.</p>



<a name="244752790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752790">(Jul 02 2021 at 20:17)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> Once the UWP and Fortanix targets set target_abi, and the Apple targets set target_family, I propose to carefully deprecate the target_vendor field, by adding a warn-by-default future-compatibility lint. target_vendor should continue to work for several years. We may eventually choose to remove it in a future edition.</p>



<a name="244752793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752793">(Jul 02 2021 at 20:17)</a>:</h4>
<p>In other words, I think that <code>target_vendor</code> could be useful, but other parts of the rust toolchain overall make it next to impossible for it to be used easily.</p>



<a name="244752873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752873">(Jul 02 2021 at 20:18)</a>:</h4>
<p>I believe that there are other avenues to differentiate targets like these, still.</p>



<a name="244752951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752951">(Jul 02 2021 at 20:19)</a>:</h4>
<p>if GBA is materially different from bare-metal thumbv4t, then perhaps cpu architecture should be different?</p>



<a name="244752980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244752980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244752980">(Jul 02 2021 at 20:19)</a>:</h4>
<p>The CPU is the same, the mmio is not</p>



<a name="244753068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753068">(Jul 02 2021 at 20:20)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> Depends on the nature of the differences. If it had different instructions I'd say change the architecture name; if it has the same instruction set but different available interfaces I'd say change the "OS".</p>



<a name="244753070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753070">(Jul 02 2021 at 20:20)</a>:</h4>
<p>Don't most baremetal CPUs have their own ideas about the peripherals?</p>



<a name="244753099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753099">(Jul 02 2021 at 20:20)</a>:</h4>
<p>thumbv4t is <em>just</em> a cpu, thus has no mmio assumptions, but the GBA is a specific device, thus has mmio, and even a small bios you can call.</p>



<a name="244753116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753116">(Jul 02 2021 at 20:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244753070">said</a>:</p>
<blockquote>
<p>Don't most baremetal CPUs have their own ideas about the peripherals?</p>
</blockquote>
<p>For something with no runtime discoverability, you may need the target to distinguish.</p>



<a name="244753137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753137">(Jul 02 2021 at 20:20)</a>:</h4>
<p>One way a "baremetal" could differ is in its… yeah, firmware APIs. At which point I would vary the ABI field.</p>



<a name="244753165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753165">(Jul 02 2021 at 20:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244753137">said</a>:</p>
<blockquote>
<p>One way a "baremetal" could differ is in its… yeah, firmware APIs. At which point I would vary the ABI field.</p>
</blockquote>
<p>Honestly, I'd call that "OS" rather than "ABI", though the difference isn't critical.</p>



<a name="244753167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753167">(Jul 02 2021 at 20:21)</a>:</h4>
<p>setting the OS to be "gba" would be a sane way to handle this distinction</p>



<a name="244753267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753267">(Jul 02 2021 at 20:22)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> As an alternative, we could choose to emit a warning if you use it to match something <em>other</em> than fortanix or uwp, and defer warning about it for those. However, I don't actually think that's a good idea. Once we have <code>target_abi</code> set for those (and <code>target_family</code> for apple targets), the deprecation can give a structured suggestion for exactly what to switch to.</p>



<a name="244753282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753282">(Jul 02 2021 at 20:22)</a>:</h4>
<p>I don't think i like the abi field being changed because the call abi is not different. You use the normal call abi rules. it's other parts of the environment that's different.</p>



<a name="244753372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753372">(Jul 02 2021 at 20:23)</a>:</h4>
<p>Part of the issue here is that "environment" is overloaded.</p>



<a name="244753380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753380">(Jul 02 2021 at 20:23)</a>:</h4>
<p>if we add a new <code>linux-gnu</code> arch, would we call it <code>NEW-linux-gnu</code>, or still put <code>unknown</code> in there to align with its peers?</p>



<a name="244753403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753403">(Jul 02 2021 at 20:23)</a>:</h4>
<p><del>@<strong>cuviper</strong> I think that depends on if we're the first ones to add it.</del><br>
EDIT: retracted, if we're adding a <code>linux-gnu</code> or <code>linux-musl</code> target, by definition we're not the first ones to add it, since glibc or musl would need support.</p>



<a name="244753474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753474">(Jul 02 2021 at 20:24)</a>:</h4>
<p>first among whom?</p>



<a name="244753479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753479">(Jul 02 2021 at 20:24)</a>:</h4>
<p>Toolchains.</p>



<a name="244753500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753500">(Jul 02 2021 at 20:24)</a>:</h4>
<p>What I think I would like here is a way for rustc to add an OS to a no-os target profile but otherwise use everything else for the target, including any tier 2 pre-built artifacts from rustup.</p>



<a name="244753529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753529">(Jul 02 2021 at 20:24)</a>:</h4>
<p><del>If we're inventing the target name I think we could choose to call it <code>newarch-linux-gnu</code>. If there's an existing toolchain we need to be compatible with, we should be compatible with that toolchain.</del><br>
EDIT: retracted, if we're adding a <code>linux-gnu</code> or <code>linux-musl</code> target there would already be support in the underlying library by definition, so we'd want to be compatible with that, and it's likely to use <code>newarch-unknown-linux-env</code></p>



<a name="244753539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753539">(Jul 02 2021 at 20:25)</a>:</h4>
<p>So then, for baremetals, if we utilize OS to define the peripherals of the SoC; how do you differentiate between different OSes (e.g. FreeRTOS?) that you may want to run on those SoCs? You will still want to know what set of peripherals you're interacting, but also which RTOS you have on hand.</p>



<a name="244753580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753580">(Jul 02 2021 at 20:25)</a>:</h4>
<p>"gnu" implies there's already glibc support, at least, if not gcc etc.</p>



<a name="244753690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753690">(Jul 02 2021 at 20:26)</a>:</h4>
<p>taking the gba example, one could run <a href="https://github.com/rust-lang/RTOS/issues/1">RTOS#1</a> and <a href="https://github.com/rust-lang/RTOS/issues/2">RTOS#2</a>, both of which provide the necessary primitives to implement <code>libstd</code>. What would the gba targets look like?</p>



<a name="244753692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753692">(Jul 02 2021 at 20:26)</a>:</h4>
<p><span class="user-mention" data-user-id="138448">@cuviper</span> That's true. So it may be a moot point for linux-gnu targets, in practice, and only apply to targets we originate and add first.</p>



<a name="244753715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753715">(Jul 02 2021 at 20:26)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> good point</p>



<a name="244753826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753826">(Jul 02 2021 at 20:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244753372">said</a>:</p>
<blockquote>
<p>Part of the issue here is that "environment" is overloaded.</p>
</blockquote>
<p>Arguably, something like "UWP" is kind of an environment, not exactly an OS. <code>x86_64-unknown-windows-uwp</code> would make sense, except that we still <em>also</em> need to distinguish <code>gnu</code> and <code>msvc</code>...</p>



<a name="244753939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753939">(Jul 02 2021 at 20:28)</a>:</h4>
<p>I think ABI is the closest match we have.</p>



<a name="244753950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244753950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244753950">(Jul 02 2021 at 20:28)</a>:</h4>
<p>"vendor" definitely isn't; UWP isn't a vendor.</p>



<a name="244754105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754105">(Jul 02 2021 at 20:30)</a>:</h4>
<p>So we do have a couple of situations where there I think aren't a way to distinguish between two targets based on target_* cfgs: gnueabi and gnueabihf for arm targets.</p>



<a name="244754137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754137">(Jul 02 2021 at 20:30)</a>:</h4>
<p>they both are <code>target_env="gnu"</code></p>



<a name="244754158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754158">(Jul 02 2021 at 20:30)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> We have <code>target_abi</code> for exactly that purpose.</p>



<a name="244754185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754185">(Jul 02 2021 at 20:31)</a>:</h4>
<p>gnueabi has <code>target_abi="eabi"</code>, and gnueabihf has <code>target_abi="eabihf"</code>.</p>



<a name="244754211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754211">(Jul 02 2021 at 20:31)</a>:</h4>
<p>Huh, <code>--print cfg</code> does not output these <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="244754324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754324">(Jul 02 2021 at 20:32)</a>:</h4>
<p><code>target_env</code> for both of these is <code>gnu</code> though.</p>



<a name="244754354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754354">(Jul 02 2021 at 20:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754324">said</a>:</p>
<blockquote>
<p><code>target_env</code> for both of these is <code>gnu</code> though.</p>
</blockquote>
<p>Yeah, that's intentional.</p>



<a name="244754364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754364">(Jul 02 2021 at 20:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754211">said</a>:</p>
<blockquote>
<p>Huh, <code>--print cfg</code> does not output these <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>
</blockquote>
<p>I'll file that as a bug.</p>



<a name="244754400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754400">(Jul 02 2021 at 20:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754185">said</a>:</p>
<blockquote>
<p>gnueabi has <code>target_env="eabi"</code>, and gnueabihf has <code>target_env="eabihf"</code>.</p>
</blockquote>
<p>these should have said <code>target_abi</code></p>



<a name="244754437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754437">(Jul 02 2021 at 20:33)</a>:</h4>
<p>seems hard to be fully precise if both are just <code>gnu</code></p>



<a name="244754463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754463">(Jul 02 2021 at 20:33)</a>:</h4>
<p>env is gnu, abi is the other stuff</p>



<a name="244754469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754469">(Jul 02 2021 at 20:33)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> <a href="https://github.com/rust-lang/rust/issues/80970#issuecomment-873243549">https://github.com/rust-lang/rust/issues/80970#issuecomment-873243549</a></p>



<a name="244754474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754474">(Jul 02 2021 at 20:33)</a>:</h4>
<p>there's also env=musl</p>



<a name="244754484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754484">(Jul 02 2021 at 20:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="138448">cuviper</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754400">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754185">said</a>:</p>
<blockquote>
<p>gnueabi has <code>target_env="eabi"</code>, and gnueabihf has <code>target_env="eabihf"</code>.</p>
</blockquote>
<p>these should have said <code>target_abi</code></p>
</blockquote>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> Sigh, typo.</p>



<a name="244754540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754540">(Jul 02 2021 at 20:34)</a>:</h4>
<p>Sorry for the gratuitous confusion there.</p>



<a name="244754548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754548">(Jul 02 2021 at 20:34)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> ^</p>



<a name="244754633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754633">(Jul 02 2021 at 20:35)</a>:</h4>
<p>I think this target_abi RFC just hasn't been implemented, perhaps.</p>



<a name="244754725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754725">(Jul 02 2021 at 20:36)</a>:</h4>
<p>there are no tests for it, or any references at all in the rustc codebase. But regardless, I think we can accept that it is a likely option to utilize to differentiate in the future.</p>



<a name="244754766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754766">(Jul 02 2021 at 20:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244754633">said</a>:</p>
<blockquote>
<p>I think this target_abi RFC just hasn't been implemented, perhaps.</p>
</blockquote>
<p>Ah, you're right. I thought it had been partially implemented.</p>



<a name="244754771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244754771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244754771">(Jul 02 2021 at 20:36)</a>:</h4>
<p>/me updates the MCP.</p>



<a name="244755103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244755103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244755103">(Jul 02 2021 at 20:40)</a>:</h4>
<p>Done.</p>



<a name="244756238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244756238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Denton <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244756238">(Jul 02 2021 at 20:52)</a>:</h4>
<p>Hm, it feels kinda weird to call UWP an ABI. But I'm not sure of a better way to do it and I guess it's no weirder than "vendor".</p>



<a name="244756626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244756626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244756626">(Jul 02 2021 at 20:55)</a>:</h4>
<p>Yeah, I'm not suggesting it's <em>exactly</em> accurate, but it seems more accurate than "vendor".</p>



<a name="244757095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244757095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244757095">(Jul 02 2021 at 21:00)</a>:</h4>
<p>I sorta wish ABI strictly meant the C call ABI, and we use another name for environment variants (in either OS or Hardware)</p>



<a name="244757789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244757789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244757789">(Jul 02 2021 at 21:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244757095">said</a>:</p>
<blockquote>
<p>I sorta wish ABI strictly meant the C call ABI, and we use another name for environment variants (in either OS or Hardware)</p>
</blockquote>
<p>i think the usage i've tended to hear is "calling convention" for the part of the the ABI that specifies how functions get called (registers, stack frames, etc), while ABI includes stuff like object and executable formats, available system library interfaces, etc</p>



<a name="244758043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244758043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244758043">(Jul 02 2021 at 21:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244753167">said</a>:</p>
<blockquote>
<p>setting the OS to be "gba" would be a sane way to handle this distinction</p>
</blockquote>
<p>I actually ended up doing this for <a href="https://github.com/chorman0773/SNES-Dev">https://github.com/chorman0773/SNES-Dev</a> in config-sh, because I found out about the <code>wdc</code> vendor, which, when finalizing the target system  I chose to leave intact as the default vendor for <code>w65-*</code>. </p>
<p>From the MCP:</p>
<blockquote>
<p>For future new targets, I propose to omit the "vendor" component entirely unless needed for compatibility with naming already used by other existing widespread toolchains</p>
</blockquote>
<p>For this, I have to ask what "widespread" means? Does it mean that if compatibility for existing config-sh targets is desired for the target, it should leave the vendor intact, or does it consider future targets? Would it include forks of config-sh? If so, I could make the argument, for any target really, of "I intend to extend xyz tool to support this in the reasonable future". If not, however, it could interfere with the ability to add new targets to rust and eventually support them with with other toolchains. If config-sh is not considered at all for these purposes, then I'd raise a concern about that, given the tools I work on and with that take config.sub in particular as a normative definition for target tuples, that would reasonably need or want to interact with rust targets (<a href="https://github.com/chorman0773/rust-autotools">https://github.com/chorman0773/rust-autotools</a>, <a href="https://github.com/chorman0773/rust-target-tuples">https://github.com/chorman0773/rust-target-tuples</a>, <a href="https://github.com/LightningCreations/lccc">https://github.com/LightningCreations/lccc</a>, <a href="https://github.com/LightingCreations/lc-binutils">https://github.com/LightingCreations/lc-binutils</a>).</p>



<a name="244760584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244760584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244760584">(Jul 02 2021 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="257758">@Connor Horman</span> So, two separate things...</p>



<a name="244761131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244761131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244761131">(Jul 02 2021 at 21:49)</a>:</h4>
<p><span class="user-mention" data-user-id="257758">@Connor Horman</span> First, I don't have the strong impression that autoconf's <code>config.*</code> would have a <em>hard</em> requirement that the vendor field exist. Second, I think it's reasonable to distinguish between "GCC or LLVM or binutils or glibc or musl or similar has implemented this under a specific target name and we should be compatible with that" from "this is a proposed new target for various things, including Rust".</p>



<a name="244761143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244761143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244761143">(Jul 02 2021 at 21:49)</a>:</h4>
<p>If someone is still in the "I intend to" phase, it's reasonable for us to provide input on the utility of the vendor field.</p>



<a name="244761504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244761504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244761504">(Jul 02 2021 at 21:54)</a>:</h4>
<p>Also, as far as I can tell, there are <em>many</em> Rust targets that don't exist in config.{sub,guess}..</p>



<a name="244761518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244761518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244761518">(Jul 02 2021 at 21:54)</a>:</h4>
<p>Not because they can't, but because nobody has added them.</p>



<a name="244761757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244761757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244761757">(Jul 02 2021 at 21:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244761131">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="257758">Connor Horman</span> First, I don't have the strong impression that autoconf's <code>config.*</code> would have a <em>hard</em> requirement that the vendor field exist. Second, I think it's reasonable to distinguish between "GCC or LLVM or binutils or glibc or musl or similar has implemented this under a specific target name and we should be compatible with that" from "this is a proposed new target for various things, including Rust".</p>
</blockquote>
<p>As far as I can tell, the vendor field in <code>config.sub</code> is guaranteed to be produced in it's ouput (but is not required in the input, many basic_machines will infer the vendor component from the architecture, and I think a couple infer from the os component). So then the question would become whether rust targets are considered to be in canonical form. </p>
<p>Turning to the second point, sure general intention may not be applicable, but if the intention is specifically to support the target in GCC or LLVM, and significant steps towards that have been taken, it could be reasonably necessary for compatibiltiy. See for example, <code>w65-wdc-snes-elf</code>, I've added support for this (canonical) target to a fork of <a href="https://github.com/chorman0773/config-sh">config-sh</a> and <a href="https://github.com/chorman0773/binutils-gdb">binutils-gdb</a>, and intend to support it in gcc after binutils is complete. As I also intend to add support for this to rust, I would argue that compatibility is desired, even though the gcc support does not exist, and nothing is yet upstream (though patches for the sys component <code>snes-elf</code> and several others in that family, are on the config mailing list, with indeterminate status), as someone who has had a lot of <em>fun</em> attempting to bridge autotools and rustc targets.</p>



<a name="244764233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244764233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244764233">(Jul 02 2021 at 22:32)</a>:</h4>
<p>That's the kind of thing the Candidate Target Policy is supposed to help coordinate.</p>



<a name="244764260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244764260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244764260">(Jul 02 2021 at 22:32)</a>:</h4>
<p>But also, I think that again comes down to what it takes to support a target in GCC/config.guess/config.sub.</p>



<a name="244770440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244770440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zack Weinberg <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244770440">(Jul 03 2021 at 00:22)</a>:</h4>
<p>Copying over what I accidentally posted to the Github issue:</p>
<p>With my autoconf maintainer hat on, I endorse all of the proposal _except_ for:</p>
<blockquote>
<p>For future new targets, I propose to omit the "vendor" component entirely unless needed for compatibility with naming already used by other existing widespread toolchains. Whenever we create a new target name, we should omit the "vendor" element entirely, as we did for wasm32-wasi</p>
</blockquote>
<p>Omitting the "vendor" element entirely is not safe, as it triggers a "this must not be in canonical form" parsing mode in a variety of tools (most prominently <code>config.sub</code> but also IIRC there are independently developed system-name parsers in CMake, Ansible, etc.), which may lead to surprising errors. You should always set the "vendor" element to a dummy value; if there is no reason to choose a different one, use <code>unknown</code>.  In particular <code>wasm32-wasi</code> should become <code>wasm32-unknown-wasi</code> as soon as practical.</p>
<p>It would be appreciated if the Rust community would in future discuss the naming of new targets with <code>config-patches@gnu.org</code>; this will help avoid accidental name collisions and ensure that <code>config.sub</code> handles them properly.  (It's not necessary for a system to support <code>config.guess</code> for us to want to know about it; many existing bare-metal and embedded contexts already don't.)  We would also like to hear about existing Rust targets that config.sub doesn't yet recognize.</p>



<a name="244770580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244770580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zack Weinberg <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244770580">(Jul 03 2021 at 00:25)</a>:</h4>
<p>Semi-relatedly, I'm happy to advise (innn my copious free time) on any issues related to coordination between Rust and GNU projects.</p>



<a name="244771062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771062">(Jul 03 2021 at 00:35)</a>:</h4>
<p><span class="user-mention" data-user-id="424715">@Zack Weinberg</span> The name <code>wasm32-wasi</code> isn't likely to change; it's a stable target name.</p>



<a name="244771117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771117">(Jul 03 2021 at 00:36)</a>:</h4>
<p>It'd certainly help to have input in terms of "what kinds of things does config.sub have trouble parsing", though, for future reference.</p>



<a name="244771148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771148">(Jul 03 2021 at 00:37)</a>:</h4>
<p>All that said, while I'd like to see future target names omit the vendor field, that's a less important part of this proposal, and I may separate that out to focus on the deprecation of and transition away from <code>cfg(target_vendor)</code>.</p>



<a name="244771232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771232">(Jul 03 2021 at 00:39)</a>:</h4>
<p><span class="user-mention silent" data-user-id="424715">Zack Weinberg</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244770440">said</a>:</p>
<blockquote>
<p>Copying over what I accidentally posted to the Github issue:</p>
<p>With my autoconf maintainer hat on, I endorse all of the proposal _except_ for:</p>
<blockquote>
<p>For future new targets, I propose to omit the "vendor" component entirely unless needed for compatibility with naming already used by other existing widespread toolchains. Whenever we create a new target name, we should omit the "vendor" element entirely, as we did for wasm32-wasi</p>
</blockquote>
<p>Omitting the "vendor" element entirely is not safe, as it triggers a "this must not be in canonical form" parsing mode in a variety of tools (most prominently <code>config.sub</code> but also IIRC there are independently developed system-name parsers in CMake, Ansible, etc.), which may lead to surprising errors. You should always set the "vendor" element to a dummy value; if there is no reason to choose a different one, use <code>unknown</code>.  In particular <code>wasm32-wasi</code> should become <code>wasm32-unknown-wasi</code> as soon as practical.</p>
</blockquote>
<p>Yeah, I had the same thought. My tools that parse targets also have the same "feature" (that all canonical forms of targets have a vendor field).</p>
<blockquote>
<p>We would also like to hear about existing Rust targets that config.sub doesn't yet recognize.</p>
</blockquote>
<p>I could probably actually compile that list, as I've got the stuff setup for testing that manually pretty well done (and could probably automate it fairly well). I've already identified a few that config.sub doesn't support (and I also would be willing to add them to <code>config.sub</code>).</p>



<a name="244771444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771444">(Jul 03 2021 at 00:44)</a>:</h4>
<p><code>cfg(target_vendor = "apple")</code> is a semi-common way to do <code>cfg(any(target_os = "macos", target_os = "tvos", target_os = "ios"))</code>, although it also handles the hypothetical <code>target_os = "watchos"</code> (which takes a special build of the compiler at the moment).</p>
<p>IDK if this is <em>really</em> an argument for keeping it, so much as describing a hard-to-replace use that it currently has.</p>
<p>In the past, I've stated that it's a dodgy hack to work around the lack of some kind of <code>target_family = "darwin"</code>,  although I had been told that couldn't be added, because target_family was single-value and too many build scripts check for <code>env::var(CARGO_CFG_TARGET_FAMILY) == "unix"</code>... which... I've done. Looking over <a href="https://grep.app/search?q=CARGO_CFG_TARGET_FAMILY">https://grep.app/search?q=CARGO_CFG_TARGET_FAMILY</a>, I'm... not alone.</p>
<p>Obviously, using <code>target_vendor</code> for that includes the assumption that Apple will never release a non-Darwin OS... while seems somewhat safe in the short term (even the small OS that runs on the macbook touchbars (eOS/BridgeOS) is a stripped down variant of Darwin), but could very reasonably change further in the future...</p>



<a name="244771519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244771519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244771519">(Jul 03 2021 at 00:46)</a>:</h4>
<p>ah, i missed that this is in the proposal as target_family = "apple". that name seems fine to me (it has the same assumption but avoids the ambiguity given that rust already calls macos darwin in the last part of the target triple).</p>
<p>That said, it would likely break a lot of build scripts that currently work on apple...</p>



<a name="244772436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244772436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244772436">(Jul 03 2021 at 01:10)</a>:</h4>
<p><span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> I'm not proposing to break existing code that uses <code>target_vendor</code>. It'd get a deprecation warning, but cap-lints would suppress that for dependencies. (And cargo's machinery for surfacing future-incompatibility warnings would flag it.)</p>



<a name="244772488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244772488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244772488">(Jul 03 2021 at 01:11)</a>:</h4>
<p>right, i'm more concernted about the suggestion to change target_family (or, particularly, what CARGO_CFG_TARGET_FAMILY returns for build scripts, since if both <code>apple</code> and <code>unix</code> are set, it should be <code>CARGO_CFG_TARGET_FAMILY="apple,unix"</code>, but lots of existing code tests for <code>env::var("CARGO_CFG_TARGET_FAMILY").unwrap() == "unix"</code>.</p>



<a name="244772531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244772531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244772531">(Jul 03 2021 at 01:12)</a>:</h4>
<p>i guess that's more of a tangential concern — even without a replacement for <code>target_vendor = "apple"</code> it's not really a reason not to deprecate it</p>



<a name="244772604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244772604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244772604">(Jul 03 2021 at 01:14)</a>:</h4>
<p>(and i may be over-worried. it certainly seems like it would be a problem, but it would be to check with crater... although i remember hearing it's linux only...)</p>



<a name="244772956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244772956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244772956">(Jul 03 2021 at 01:24)</a>:</h4>
<p>Ah! I didn't actually realize that apple had <code>target_family</code> already set.</p>



<a name="244773171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244773171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244773171">(Jul 03 2021 at 01:31)</a>:</h4>
<p>I updated the proposal to make that particular change optional.</p>



<a name="244773174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244773174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244773174">(Jul 03 2021 at 01:31)</a>:</h4>
<p>We can evaluate how much we think it'll help vs how much it might break existing build scripts that parse the family incorrectly.</p>



<a name="244792582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244792582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244792582">(Jul 03 2021 at 09:03)</a>:</h4>
<blockquote>
<p>In particular wasm32-wasi should become wasm32-unknown-wasi as soon as practical.</p>
</blockquote>
<p>FWIW I think it'd be great if target triples could be simplified to remove that "vendor" field... literally <em>every single time</em> I need to pass a triple, I have to go somewhere and copy-paste it. As far as I am concerned, the current triple names are opaque blobs that only the machine can really keep track of: I know where I can go to copy-paste the triple for "32bit linux", but I entirely gave up trying to remember this one (even though I actually need it fairly frequently).</p>



<a name="244792629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244792629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244792629">(Jul 03 2021 at 09:04)</a>:</h4>
<p>possibly I could remember <code>i686-linux-gnu</code> or <code>x86_64-windows-msvc</code>, but where to put the useless "unknown" or "pc" seems entirely random</p>



<a name="244792640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244792640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244792640">(Jul 03 2021 at 09:05)</a>:</h4>
<p>So I am actually quite happy about target names like <code>wasm32-wasi</code> that are not just computer- but also human readable and memorable. ;)</p>



<a name="244792716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244792716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244792716">(Jul 03 2021 at 09:07)</a>:</h4>
<p>I'd love if this proposal was extended to suggest that rustc should accept target triples without the vendor field in them... but I have the impression that this would get quite a bit of pushback, sadly. Since it looks like everyone agrees that the vendor field is useless, I'd hope that some day we can remove it entirely from the user-visible interface, instead of forcing users to remember arcane runes by heart that long lost their usefulness.</p>



<a name="244793059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793059">(Jul 03 2021 at 09:13)</a>:</h4>
<p>Debian doesn't use <code>-unknown-</code> either in filesystem paths. On my system I have <code>/usr/aarch64-linux-gnu</code>, <code>/usr/riscv64-linux-gnu</code>, <code>/usr/x86_64-w64-mingw32</code>, <code>/lib/x86_64-linux-gnu/</code> and <code>/lib/x86_64-linux-musl/</code>.</p>



<a name="244793519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793519">(Jul 03 2021 at 09:23)</a>:</h4>
<p>We already support multiple target_family values per target.</p>



<a name="244793573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793573">(Jul 03 2021 at 09:24)</a>:</h4>
<p>as of <a href="https://github.com/rust-lang/rust/pull/84072">https://github.com/rust-lang/rust/pull/84072</a></p>



<a name="244793577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793577">(Jul 03 2021 at 09:24)</a>:</h4>
<p>so <code>cfg(all(target_family="apple", target_family="unix"))</code> can very well hold true.</p>



<a name="244793600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793600">(Jul 03 2021 at 09:25)</a>:</h4>
<p>No idea what cargo would do with environment variables though ^^</p>



<a name="244793679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244793679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244793679">(Jul 03 2021 at 09:27)</a>:</h4>
<p>I guess it would be the same as what it does for <code>target_feature</code>?</p>



<a name="244803533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244803533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244803533">(Jul 03 2021 at 12:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244793600">said</a>:</p>
<blockquote>
<p>No idea what cargo would do with environment variables though ^^</p>
</blockquote>
<p>Multi-valued cfgs (currently) are comma-separated, so it should come through as "apple,unix" (maybe the order would be another way). This might be fine, but i think it has a real risk of breaking macos/ios support on existing <a href="http://build.rs">build.rs</a> code that just tests that CARGO_CFG_TARGET_FAMILY == "unix"...</p>
<p>However, one way to test if my fear is founded occurred to me while reading that issue when you mentioned <code>cfg(target_family = "x86")</code>. I suspect if we did a crater run to see how much bustage occurs from making something like adding target_family = "x86" to x86_64-unknown-linux-gnu (or rather, whatever linux target it is that crater prefers to run).</p>
<p>Concretely, I suspect a lot would break if <code>CARGO_CFG_TARGET_FAMILY</code> started to come through as <code>"unix,x86"</code> on x86 linux — I think it would break almost all the build scripts that look at that env var... <em>but</em> I could be wrong, and if that doesn't cause massive breakage, it seems like a very safe bet that adding <code>"apple"</code> to the target_family on darwin-variants would be fine as well.</p>
<p>Just for clarity: I'm mentioning x86 linux here since i believe crater supports it, and I also believe crater does not support macos (This might be wrong). The test would function as a proxy for macos, or could more broadly be seen as testing that additions to <code>target_family</code> can be done in a likely-nonbreaking way.</p>
<p>I'm also explicitly not saying that I think x86 targets should all have <code>target_family="x86"</code> — just that it seems plausible, and likely to function as a canary that may indicate how fragile <code>target_family</code> handling is in real-world <a href="http://build.rs">build.rs</a> scripts</p>



<a name="244803557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244803557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244803557">(Jul 03 2021 at 12:44)</a>:</h4>
<p>(I guess this is getting off-topic, but am unsure where to move it since adding a new topic in the MCP stream would not be correct, really)</p>



<a name="244805123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244805123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244805123">(Jul 03 2021 at 13:20)</a>:</h4>
<p><span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> yes, crater only supports x86_64 Linux (this has given <a href="http://docs.rs">docs.rs</a> trouble since they use the same sandbox)</p>



<a name="244807179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244807179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244807179">(Jul 03 2021 at 14:02)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span>  said (side note, why does zulip mobile not have quote function):</p>
<blockquote>
<p>I'd love if this proposal was extended to suggest that rustc should accept target triples without the vendor field in them... but I have the impression that this would get quite a bit of pushback, sadly. Since it looks like everyone agrees that the vendor field is useless, I'd hope that some day we can remove it entirely from the user-visible interface, instead of forcing users to remember arcane runes by heart that long lost their usefulness.</p>
</blockquote>
<p>As was mentioned a few times above, there is a use for the vendor field: ensuring consistency in canonical forms, which makes mechanical parsing easier (All of my shell script "fixing" rustc targets in rust-autotools assumes that <code>*-*-*</code> matches any target, and that consuming the third component gives the entire system). Of course, that doesn't mean that rustc cannot accept targets w/o the vendor field, it just means that rust code using "TARGET" need to acknowledge that it may be (and that it needs to be canonicalized, which is fun, before processing it in the normal way).<br>
I'd support this, iff they were made aliases of the canonical form (with the vendor field). That is, for some target $targ, if rustc accepts $targ it should also accept <code>config.sub $targ</code> (unless and while that is an error, which it currently is for 52 targets) and they should mean the same thing. This supports using build systems like autotools (which precanonicalizes targets) with rustc, and implementations that internally canonicalizes targets (which lccc <a href="https://https://github.com/LightningCreations/lccc/blob/620bbd5e028c59dab89696af90077c1a51507f8d/xlang/include/xlang%2B%2B/Target.hpp#L152..L172">does</a>).</p>



<a name="244807354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244807354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244807354">(Jul 03 2021 at 14:07)</a>:</h4>
<p>You can let rustc "parse" the target triple for you: <code>rustc --target my-target --print cfg</code>.</p>



<a name="244808377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244808377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244808377">(Jul 03 2021 at 14:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/243200-t-lang.2Fmajor-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102/near/244807354">said</a>:</p>
<blockquote>
<p>You can let rustc "parse" the target triple for you: <code>rustc --target my-target --print cfg</code>.</p>
</blockquote>
<p>Wouldn't that give me a bunch of CFG fields (and also, wouldn't that require that rustc accept the target in the first place?). The point of the shell script in rust-autotools is that rustc <em>doesn't</em> accept the host target or host_alias (if supplied) and I have to parse it's canonical form to find the equivalent target that rustc <em>does</em> accept (and it's a bunch of very fragile, hacky special cases). Also, if the reason you are parsing targets is for support for existing toolchains, I'm going to assume that whatever rustc does isn't going to be perfectly compatible with that, mainly because of backwards compatibility issues that isn't cross-compatible. Could I do so? Probably. Would I? No, merely because it won't parse it precisely the way I expect it (then I break other things down the line).</p>



<a name="244808509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244808509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244808509">(Jul 03 2021 at 14:31)</a>:</h4>
<p>(Also, I doubt the output of <code>rustc --target my-target --print cfg</code> will be any easier to parse with a shell script)</p>



<a name="244808716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244808716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244808716">(Jul 03 2021 at 14:35)</a>:</h4>
<p>I was thinking about rustc target -&gt; autotools target.</p>



<a name="244809141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244809141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244809141">(Jul 03 2021 at 14:43)</a>:</h4>
<p>I actually have an entire library that does that, and also that does autotools canonicalizations. Specifically (once I go through the supported targets list I copied into a shell script and implement them), it goes from rustc=&gt;canonical and a subset of noncanonical=&gt;canonical (because some of the noncanonical targets config.sub accepts are just painful to implement, and I highly doubt I'd ever encounter them in the wild).</p>



<a name="244846886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244846886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244846886">(Jul 04 2021 at 07:43)</a>:</h4>
<blockquote>
<p>As was mentioned a few times above, there is a use for the vendor field: ensuring consistency in canonical forms, which makes mechanical parsing easier</p>
</blockquote>
<p>I don't follow. Canonical forms could just as well be defined without the vendor field. This is just a historical artifact, nothing set in stone -- even less so for Rust, which often likes to do the right thing instead of doing the old thing.</p>



<a name="244854523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/243200-t-lang/major%20changes/topic/Deprecate%20target_vendor%20%20lang-team%23102/near/244854523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/243200-t-lang/major-changes/topic/Deprecate.20target_vendor.20.20lang-team.23102.html#244854523">(Jul 04 2021 at 11:15)</a>:</h4>
<p>I guess it could, but then all code parsing canonical targets would have to be updated for rust specifically (and this affects code that <em>also</em> needs to deal with autotools targets, which means it cannot merely change how it works). <br>
Thus, it would have to be a non-canonical target form (wrt. autotools targets), and that should be made known for anyone using it directly, without attempting to canonicalize it. I have one crate that does, but it's intended to use the non-canonical form anyways, though the projects I mentioned previously, especially lccc, would be affected. Beyond that, I don't know how much code would break if targets became non-canonical. <br>
Of course, if targets are in non-canonical form, then I think it would be a very good idea to also accept the canonical form of each such target, for the reasons I mentioned above.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>